package com.ruoyi.system.domain;

import lombok.Data;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SysImportResult {
    private int successCount;  // 成功条数
    private int failCount; //失败条数
    private String message;
    private List<SysRegion> addfaillist;

    public SysImportResult(int successCount, int failCount, String message) {
        this.successCount = successCount;
        this.failCount = failCount;
        this.message = message;
    }

    public SysImportResult(int successCount, int failCount, List<SysRegion> addfaillist, String message) {
        this.successCount = successCount;
        this.failCount = failCount;
        this.addfaillist = addfaillist;
        this.message = message;
    }

    public SysImportResult(int successCount, int failCount) {
        this.successCount = successCount;
        this.failCount = failCount;
    }

    public SysImportResult(int failCount, String message) {
        this.failCount = failCount;
        this.message = message;
    }

    public List<SysRegion> getAddfaillist() {
        return addfaillist;
    }

    public void setAddfaillist(List<SysRegion> addfaillist) {
        this.addfaillist = addfaillist;
    }

    public SysImportResult() {
    }

    public int getSuccessCount() {
        return successCount;
    }

    public void setSuccessCount(int successCount) {
        this.successCount = successCount;
    }

    public int getFailCount() {
        return failCount;
    }

    public void setFailCount(int failCount) {
        this.failCount = failCount;
    }
    public  SysImportResult successAll(int successCount,int failCount){
        return new SysImportResult(successCount,failCount,"数据导入成功");
    }
    public  SysImportResult success(int successCount , int failCount,List<SysRegion> addfaillist){
        return new SysImportResult(successCount,failCount ,addfaillist,"部分数据导入成功");
    }
    public  SysImportResult failAll(int successCount,int failCount,List<SysRegion> addfaillist){
        return new SysImportResult(successCount,failCount,addfaillist,"数据导入失败");
    }
}
